LinkUpdated
TheLinkUpdated
method should replace the content at each destination of a link with new content from an updated link object.
void LinkUpdated (in ODLink updatedLink, in ODUpdateID change);
updatedLink
- A reference to a link that has changed.
change
- The update ID associated with the link; an identifier for a particular version of link-source data.
DISCUSSION
Each link object maintains a registry of dependent parts. If this part is registered as a dependent of the link source (by having called the link'sRegisterDependent
method), OpenDoc calls this method automatically when the link destination object changes.Your part's
LinkUpdated
method should retrieve the data from the link and incorporate or embed that data into your part at the link's destination, thereby replacing any previous content of the link.It is not always necessary to update link destinations immediately. For example, if the destination has scrolled offscreen but is registered as a dependent of the link, updating does not need to occur until the destination scrolls back into view. Your part editor can, if desired, perform link updating as a background task.
OVERRIDING
When you subclassODPart
, you can override this method. Your override method must not call its inherited method; that is, your override method must implement this method's functionality completely.EXCEPTIONS
kODErrDoesNotLink
- The specified link is not a link of this part.
SEE ALSO
TheODUpdateID
type (page 917).
TheODLink::RegisterDependent
method (page 355).
Table 2-1 on page 89 in OpenDoc Programmer's Guide.
"Creating a Link at the Destination" on page 380 in OpenDoc Programmer's Guide.
"Updating a Link at the Destination" on page 384 in OpenDoc Programmer's Guide.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help